<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div.outer{
            width:300px;
            height:100px;
            border:1px solid red;
            margin:0 auto;
            overflow: hidden;
        }
        div.image{
            width:1500px;
            height:100px;
            background-color: blue;
            animation-name:move;
            animation-duration: 10s;
            animation-iteration-count: infinite;
            animation-timing-function: steps(5);
        }
        div.image div{
            width:300px;
            height:100px;
            font-size:35px;
            color:#fff;
            float:left;
        }
        @keyframes move{
            from{
                margin-left:0px
            }
            to{
                margin-left: -1500px;
            }
        }
    </style>
</head>
<body>
    <div class="outer">
        <div class="image">
            <div style="background-color: rosybrown">div1</div>
            <div style="background-color: royalblue">div2</div>
            <div style="background-color: sandybrown">div3</div>
            <div style="background-color: slateblue">div4</div>
            <div style="background-color: tomato">div5</div>
        </div>
    </div>
</body>
</html>